<?
require_once("dbConn.php");
session_start();
$timeStamp = $_SESSION["loginStamp"];
$currIP = $_SESSION["loginIP"];
mysql_query("UPDATE users SET lastLogin = '$timeStamp', lastIP = '$currIP' WHERE id = '$user_id' LIMIT 1 ;");
$_SESSION = array(); //unSet Session Vars
session_destroy(); //Destroy Session
header( 'Location: index.php' ) ;
?>